<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.it.dao.MessageDao"%>
<%@ page import="com.it.bean.Message"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>留言</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<style type="text/css">
.top {
	margin-top: 5px;
}
</style>
</head>

<body>
	<%
		MessageDao messageDao = new MessageDao();
		Integer id = Integer.parseInt(request.getParameter("id"));
		Message msg = messageDao.getById(id);
		request.setAttribute("msg", msg);
	%>
	<div class="container top">
		<p>欢迎【${sessionScope.user.userName}】进入简易留言本后台管理系统</p>
		<div class="row top">
			<label class="col-md-1">昵称:</label> <input value="${msg.nickname }">
		</div>
		<div class="row top">
			<label class="col-md-1">标题:</label> <input value="${msg.title }">
		</div>
		<div class="row top">
			<label class="col-md-1">联系方式:</label> <input value="${msg.phone }">
		</div>
		<div class="row top">
			<label class="col-md-1">留言内容:</label>
			<textarea rows="5" cols="40">${msg.content }</textarea>
		</div>
	</div>
</body>
</html>
